name: pyinstaller

on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: windows-latest
    strategy:
      fail-fast: false

    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-python@v5
      with:
        python-version: '3.12'

    - uses: engineerd/configurator@v0.0.10
      with:
        name: "upx.exe"
        url: "https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-win64.zip"
        pathInArchive: "upx-4.2.2-win64/upx.exe"

    - run: pip install -r requirements.txt
    - run: pip install pyinstaller garth
    - run: pyinstaller standalone.spec

    - uses: actions/upload-artifact@v4
      with:
        path: dist/*
